package com.kun.demo03;


import org.junit.Test;

//倒计时
public class SleepUse01 {

    @Test
    public void testSleep() throws InterruptedException {
        down(5);
    }


    public void down(int num){
        for(int i=num;i>=1;i--){
            System.out.println(i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }


}
